package com.zd.service.lmpl;/**
 * @Description: WaybillstateServicelmpl
 * @Author:pioneer
 * @Date: 2021-07-05
 * @Version:v1.0
 */

import com.zd.mapper.WaybillstateZdMapper;
import com.zd.service.lnter.WaybillstateServicelnter;
import com.zzg.entity.Waybillstate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: WaybillstateServicelmpl
 * @Author:pioneer
 * @Date: 2021-07-05
 * @Version:v1.0
 */
@Service
public class WaybillstateServicelmpl implements WaybillstateServicelnter {

    @Autowired
    private WaybillstateZdMapper waybillstateMapper;
    /**
     * 通过运输单号修改运输状态
     *
     * @param transportstatus 运输状态
     * @param shipping        运输单号
     * @return 返回数值判断是否修改成功
     */
    @Override
    public int updatestateBy(String transportstatus, String shipping) {
        return waybillstateMapper.updatestateBy (transportstatus,shipping);
    }

    /**
     * 通过运输单号删除运单状态
     *
     * @param waybillid 运单id
     * @return 回数值判断是否修改成功
     */
    @Override
    public int delectWaybillstate(String waybillid) {
        return waybillstateMapper.delectWaybillstate (waybillid);
    }

    /**
     * 通过运单id查询该运单的所有状态
     *
     * @param waybillid 运单id
     * @return 运单状态集合
     */
    @Override
    public List<Waybillstate> getWaybillstateByid(String waybillid) {
        return waybillstateMapper.getWaybillstateByid (waybillid);
    }
}
